home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / mazda / mazIn311.dxr / Internal_20_Message Sprite .ls < prev    next >
Encoding:
Text File  |  1998-05-06  |  1.8 KB  |  50 lines

  1. property whichevent, Addressee, EventToSend, params
  2.  
  3. on initSendSprite me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11. end
  12.  
  13. on mouseDown me
  14.   if whichevent = #mouseDown then
  15.     init(me)
  16.   end if
  17. end
  18.  
  19. on prepareFrame me
  20.   if whichevent = #prepareFrame then
  21.     init(me)
  22.   end if
  23. end
  24.  
  25. on enterFrame me
  26.   if whichevent = #enterFrame then
  27.     init(me)
  28.   end if
  29. end
  30.  
  31. on exitFrame me
  32.   if whichevent = #exitFrame then
  33.     init(me)
  34.   end if
  35. end
  36.  
  37. on init me
  38.   set doit to "sendSprite the Addressee of me, the EventToSend of me," && params
  39.   do(doit)
  40. end
  41.  
  42. on getPropertyDescriptionList
  43.   set p_list to [#EventToSend: [#comment: "Message:", #format: #symbol, #default: #generic_event], #params: [#comment: "Param1, param2, ...", #format: #string, #default: EMPTY], #Addressee: [#comment: "Target Sprite:", #format: #integer, #default: 1], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #mouseDown, #prepareFrame, #enterFrame, #exitFrame, #initSendSprite], #default: #mouseUp]]
  44.   return p_list
  45. end
  46.  
  47. on getBehaviorDescription
  48.   return "Sends a message to the designated sprite when the specified event occurs.  Any behaviors attached to the target sprite that are triggered by the message will be executed." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Message - Enter the message to send to the target sprite." & RETURN & "ΓÇó Params  - Enter parameters to be sent with the message, seperated with commas." & RETURN & "ΓÇó Target Sprite - Enter the number of the sprite channel to which message should be sent." & RETURN & "ΓÇó Initializing Event - Specify the event that triggers the behavior." & RETURN & "NOTES:" & RETURN & "If there is no behavior attached to the target sprite that responds to the message being sent, the message is passed to the cast member script, the current frame script, and then movie scripts."
  49. end
  50.